package com.oracle.lingshangejia.activity;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;
import com.oracle.lingshangejia.Constant;
import com.oracle.lingshangejia.R;
import com.oracle.lingshangejia.base.BaseActivity;


public class MessageActivity extends BaseActivity implements View.OnClickListener {

    private RelativeLayout re_back;
   // private LinearLayout ll_task;
    private LinearLayout ll_notice;

    @Override
    public int intiLayout() {
        return R.layout.activity_message;
    }

    @Override
    public void initView() {
        re_back=findViewById(R.id.re_back);
        re_back.setOnClickListener(this);
      //  ll_task=findViewById(R.id.ll_task);
       // ll_task.setOnClickListener(this);
        ll_notice=findViewById(R.id.ll_notice);
        ll_notice.setOnClickListener(this);
    }

    @Override
    public void initData() {
        getNotice();

    }

    private void getNotice(){
        OkGo.<String>post(Constant.baseurl+"online/user/zxList").execute(new StringCallback() {
            @Override
            public void onSuccess(Response<String> response) {
                System.out.println(response.body().toString());            }
        });

    }
    @Override
    public void onClick(View v) {

        switch (v.getId()){

            //返回键
            case R.id.re_back:

                finish();
                break;

          /*  //我的任务
            case R.id.ll_task:

               // startActivity(new Intent(this,OutSideTaskActivity.class));
                break;*/

            //通知通告
            case R.id.ll_notice:
                startActivity(new Intent(this,NoticeActivity.class));
                break;
        }
    }
}
